<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2020/7/18
  Time: 19:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改页面</title>
    <!-- 引入css样式和js文件-->
    <meta charset="UTF-8">
    <link rel="stylesheet" href="../res/layui/css/layui.css"/>
    <script type="text/javascript" src="../res/layui/layui.js"></script>
</head>
<body>
<div class="layui-container">

    <form class="layui-form" action="/writings/update" method="post" style="width: 500px;margin: 50px auto;">
        <div class="layui-form-item">
            <label class="layui-form-label">文章id</label>
            <div class="layui-input-block">
                <input type="text" name="writingsid" id="writingsid" value="${one.writingsid}" lay-verify autocomplete="off" readonly
                       placeholder="请输入文章id"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">文章标题</label>
            <div class="layui-input-block">
                <input type="text" name="writingstitle" id="writingstitle" value="${one.writingstitle}" lay-verify autocomplete="off"
                       placeholder="请输入文章标题"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">文章内容</label>
            <div class="layui-input-block">
                <input type="text" name="writingscontent" id="writingscontent" value="${one.writingscontent}" lay-verify autocomplete="off"
                       placeholder="请输入文章内容"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">文章图片</label>
            <div class="layui-input-block">
                <input type="text" name="writingsimg" id="writingsimg" value="${one.writingsimg}" lay-verify autocomplete="off"
                       placeholder="请输入文章图片"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">文章类型</label>
            <div class="layui-input-block">
                <select name="writingstype" id="writingstype" class="layui-input">
                    <option value="">请选择文章类型</option>
                    <c:forEach items="${articletypeList}" var="cc">
                        <option value="${cc.articletypename}" ${cc.articletypename==one.writingstype?'selected':''}>${cc.articletypename}</option>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>

</div>

<script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    //定义layui的变量
    var $;
    var layer;
    var element;
    var form;
    layui.use(['element', 'layer', 'jquery', 'form'], function () {
        element = layui.element;
        layer = layui.layer;
        $ = layui.jquery;
        form = layui.form;

    });
</script>
</body>
</html>
